<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改党员信息')"/>
    <th:block th:include="include :: datetimepicker-css"/>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-partyInfo-edit" th:object="${partyInfo}">
            <input name="partyId" th:field="*{partyId}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">学号：</label>
                <div class="col-sm-8">
                    <input name="partyStudentNumber" th:field="*{partyStudentNumber}" class="form-control" type="text"
                           required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">姓名：</label>
                <div class="col-sm-8">
                    <input name="partyName" th:field="*{partyName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">班级：</label>
                <div class="col-sm-8">
                    <input name="partyClass" th:field="*{partyClass}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">性别：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_user_sex')}">
                        <input type="radio" th:id="${'partySex_' + dict.dictCode}" name="partySex"
                               th:value="${dict.dictValue}" th:field="*{partySex}" required>
                        <label th:for="${'partySex_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">生日：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="partyBirthday" th:value="${#dates.format(partyInfo.partyBirthday, 'yyyy-MM-dd')}"
                               class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">籍贯：</label>
                <div class="col-sm-8">
                    <input name="partyNativePlace" th:field="*{partyNativePlace}" class="form-control" type="text"
                           required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">身份证：</label>
                <div class="col-sm-8">
                    <input name="partyIdcard" th:field="*{partyIdcard}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">入党日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="partyJoinTime" th:value="${#dates.format(partyInfo.partyJoinTime, 'yyyy-MM-dd')}"
                               class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">入党志愿书：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_party_info_status')}">
                        <input type="radio" th:id="${'partyJoinApplication_' + dict.dictCode}"
                               name="partyJoinApplication" th:value="${dict.dictValue}"
                               th:field="*{partyJoinApplication}">
                        <label th:for="${'partyJoinApplication_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">预备党员考察表：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_party_info_status')}">
                        <input type="radio" th:id="${'partyInspect_' + dict.dictCode}" name="partyInspect"
                               th:value="${dict.dictValue}" th:field="*{partyInspect}">
                        <label th:for="${'partyInspect_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">转正申请书：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_party_info_status')}">
                        <input type="radio" th:id="${'partyFormalApplication_' + dict.dictCode}"
                               name="partyFormalApplication" th:value="${dict.dictValue}"
                               th:field="*{partyFormalApplication}">
                        <label th:for="${'partyFormalApplication_' + dict.dictCode}"
                               th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">思想报告：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_party_info_status')}">
                        <input type="radio" th:id="${'partyThoughtReport_' + dict.dictCode}" name="partyThoughtReport"
                               th:value="${dict.dictValue}" th:field="*{partyThoughtReport}">
                        <label th:for="${'partyThoughtReport_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">学生干部任职情况：</label>
                <div class="col-sm-8">
                    <input name="partyStudentPost" th:field="*{partyStudentPost}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">奖惩情况：</label>
                <div class="col-sm-8">
                    <input name="partyRewardsPunishments" th:field="*{partyRewardsPunishments}" class="form-control"
                           type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">其他：</label>
                <div class="col-sm-8">
                    <input name="partyOtherInfo" th:field="*{partyOtherInfo}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">班主任：</label>
                <div class="col-sm-8">
                    <input name="partyHeadMaster" th:field="*{partyHeadMaster}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">联系方式：</label>
                <div class="col-sm-8">
                    <input name="partyConnect" th:field="*{partyConnect}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer"/>
    <th:block th:include="include :: datetimepicker-js"/>
    <script th:inline="javascript">
        var prefix = ctx + "admin/partyInfo";
        $("#form-partyInfo-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-partyInfo-edit').serialize());
            }
        }

        $("input[name='partyBirthday']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='partyJoinTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>